<!DOCTYPE html>
<html lang="en">
<head>
    <!-- The jQuery library is a prerequisite for all jqSuite products -->
    <script type="text/ecmascript" src="../../../js/jquery.min.js"></script> 
    <!-- We support more than 40 localizations -->
    <script type="text/ecmascript" src="../../../js/trirand/i18n/grid.locale-en.js"></script>
    <!-- This is the Javascript file of jqGrid -->   
    <script type="text/ecmascript" src="../../../js/trirand/jquery.jqGrid.min.js"></script>
    <!-- This is the localization file of the grid controlling messages, labels, etc.
    <!-- A link to a jQuery UI ThemeRoller theme, more than 22 built-in and many more custom -->
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> 
    <!-- The link to the CSS that the grid needs -->
    <link rel="stylesheet" type="text/css" media="screen" href="../../../css/trirand/ui.jqgrid-bootstrap.css" />
	<script>
		$.jgrid.defaults.width = 780;
		$.jgrid.defaults.styleUI = 'Bootstrap';
	</script>
	<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
    <meta charset="utf-8" />
    <title>jqGrid Loading Data - XML</title>
</head>
<body>
<div style="margin-left:20px">
    <table id="jqGrid"></table>
    <div id="jqGridPager"></div>
</div>
    <script type="text/javascript"> 
        $(document).ready(function () {
            $("#jqGrid").jqGrid({
                url: 'data.xml',
                datatype: "xml",
                colModel: [
                    { label: 'Inv No', name: 'id', width: 75, sorttype:'integer', formatter:'integer' },
                    { label: 'Date', name: 'invdate', width: 90 },
                    { label: 'Client', name: 'name', width: 100 },
                    { label: 'Amount', name: 'amount', width: 80 },
                    { label: 'Tax', name: 'tax', width: 80 },
                    { label: 'Total', name: 'total', width: 80 },
                    { label: 'Notes', name: 'note', width: 150 }
                ],
				width: 780,
                loadonce: true,
                rowNum: 10,
                rowList: [10, 20, 30],
                pager: '#jqGridPager',
                sortname: 'id',
                viewrecords: true,
                sortorder: "desc",
                caption: "Load Data - XML"
            }).navGrid('#jqGridPager', { edit: false, add: false, del: false });
        });
      </script>

    <!-- This code is related to code tabs -->
    <br />
    <span style="margin-left:18px; font-family: Tahoma">Click on the Tabs below the see the relevant code for the example:</span>
    <br /><br />
    <div id="codetabs" style="width:700px;font-size:65%; height: 400px;"></div>
     
    <script type="text/ecmascript" src="../../../js/prettify/prettify.js"></script>
    <link rel="stylesheet" type="text/css"  property="" href="../../../css/prettify.css" />
    <script type="text/ecmascript" src="../../../js/codetabs-b.js"></script>

    <script type="text/javascript">

        var tabData =
            [
                { name: "HTML", url: "index.html", lang: "lang-html" },
                { name: "Data.XML", url: "data.xml", lang: "lang-xml" },
				{ name: "Description", url: "description.html", lang: "lang-html" }
            ];

        codeTabs(tabData);

    </script>
     <!-- End of code related to code tabs -->
</body>
</html>